projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba523f
)
pygrub: run first entry in config when invalid default boot option provided
author
Keir Fraser
<keir.fraser@citrix.com>
Fri, 20 Mar 2009 15:37:33 +0000
(15:37 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Fri, 20 Mar 2009 15:37:33 +0000
(15:37 +0000)
This behaviour matches that of real GRUB.
Signed-off-by: Michal Novotny <minovotn@redhat.com>
tools/pygrub/src/pygrub
patch
|
blob
|
history
diff --git
a/tools/pygrub/src/pygrub
b/tools/pygrub/src/pygrub
index e3a540fa04151f16b8b5e6410d2c3b710d560994..ba70832e62e01716d7049a91882bd5e9fe9571fa 100644
(file)
--- a/
tools/pygrub/src/pygrub
+++ b/
tools/pygrub/src/pygrub
@@
-530,7
+530,11
@@
def run_grub(file, entry, fs, arg):
print "No kernel image selected!"
sys.exit(1)
- img = g.cf.images[sel]
+ try:
+ img = g.cf.images[sel]
+ except:
+ log.debug("PyGrub: Default selection is not valid, using first boot configuration...")
+ img = g.cf.images[0]
grubcfg = { "kernel": None, "ramdisk": None, "args": None }